#ifndef __C_FUNCTION_H
#define __C_FUNCTION_H



#include "types.h"


#ifdef WIN32
#define CF_EXPORT  __declspec(dllexport)
#else
#define CF_EXPORT
#endif


// 为了让Lua能够使用而写的C函数
extern "C"{

CF_EXPORT u32 cur_game_time();

CF_EXPORT u64 cur_game_usec();

CF_EXPORT bool log_write(int level,const char *ss,int len);

CF_EXPORT bool log_write2(int index,const char *ss,int len);

CF_EXPORT void log_force_flush();

CF_EXPORT int string_hash(const char *str);

CF_EXPORT int c_add_redis_server(const char* ip,int port);

}


#endif

